Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 8 - TCP/IP Services / TCP/IP Services Reference
Constants and Data Types


Internet Interface Information Structure

The OTInetGetInterfaceInfo function (page 8-50) returns information about the local host in an internet interface information structure. The internet interface information structure is defined by the InetInterfaceInfo data type.

struct InetInterfaceInfo {
   InetHost       fAddress;         /* host address */
   InetHost       fNetmask;         /* subnet mask */
   InetHost       fBroadcastAddr;   /* broadcast address */
   InetHost       fDefaultGatewayAddr;/* default gateway 
                                        address */
   InetHost       fDNSAddr          /* DNS address*/
   UInt16         fVersion;         /* version number */
   UInt16         fHWAddrLen        /* HW addr length */
   UInt8*         fHWAddr;          /* HW address */
   UInt32         fIfMTU            /* Max Trans Unit */
   UInt8*         fReservedPtrs[2]; /* reserved */
   InetDomainName fDomainName;      /* host's domain name */
   UInt8          fReserved[256];   /* reserved */
};
Field Description
fAddress
The IP address of the local host in network byte order (that is, high-order byte first) in hexadecimal notation.
fNetMask
The subnet mask of the local IP network.
fBroadcastAddr
The broadcast address for the interface. The broadcast address can also be calculated by performing an OR operation on the address with the complement of the subnet mask.
fDefaultGatewayAddr
The IP address of the default gateway. The default gateway is a router or gateway that can forward any packet destined outside the locally connected subnet. This information is optional; if you don't have a default gateway, you need a specific route for every packet or message sent to a subnet other than your own your directly connected subnet.
fDNSAddr
The address of a domain name server. This value can be returned by a server or typed in by the user during configuration of the TCP/IP interface.
fVersion
The version of the OTInetGetInterfaceInfo function; currently equal to 1.
fHWAddrLen
The length (in bytes) of the hardware address.
fHWAddr
A pointer to the hardware address.
fIfMTU
The maximum transmission unit size permitted for this interface's hardware.
fReservedPtrs
Reserved.
fDomainName
The default domain name of the host. This name doesn't include the host name.
fReserved
Reserved.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996